<template>
  <div id='home'>
      <!-- 轮播 -->
       <div class="box2">
          <swiper :list="list" direction="horizontal" auto :min-moving-distance="20" height="180px"></swiper>
       </div>
       <mt-button type="primary" size="large" @click="tokenHttp">获取数据</mt-button>
   <footerTab></footerTab>
  </div>
</template>

<script>
import { Scroller, Swiper } from 'vux'
import footerTab from '@/components/footer'
export default {
   name: 'home',
  components: {
    Scroller,
    Swiper,
    footerTab
  },
  methods: {
    load (uuid) {
      const _this = this
      setTimeout(function () {
        _this.$broadcast('pulldown:reset', uuid)
      }, 2000)
    },
    tokenHttp:async function () {
       const res = await this.http.get(this.api.detail)
        if (res) {
              this.$toast(res.data.errmsg);
        }
  }
  },
  data () {
    return {
      list: [{
        url: '',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534851443476&di=3ae54b98e97e257d6bfbb58e4233f1ca&imgtype=0&src=http%3A%2F%2Fimg.mp.itc.cn%2Fupload%2F20170724%2F9e2c7f49719e460ab2ee1aa7f9836516_th.jpg',
        title: '如何挑选最合适的用药？'
      }, {
        url: '',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534851259703&di=4991f36d6309ab6fdc76a4c668961c3e&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d127599200d9a801215603d2da17.JPG%401280w_1l_2o_100sh.jpg',
        title: '养身茶的由来'
      }, {
        url: '',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534851558684&di=267bb330c090c94c5b4b67e86c5b166d&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20171125%2Fa23c0c36dcde4b5188610032097cbede.jpeg',
        title: '来和我预约最好的医生'
      }]
    }
  },

}
</script>
<style>

</style>
